export default{
	
	BASEURI: 'http://localhost:8081/',
	ESURI: 'http://localhost:8081/api/',
	/* NOSIGNGETURL:'https://26db350a-6d38-4051-8ee8-b8bd450b3311.mock.pstmn.io/', */
	NOSIGNGETURL:'http://47.100.137.24:7300/mock/5f8cdf51427baf012815c147/',
	/* 接口名称 */
	/* const index={
		getLunbo:'api/getlunbo'
	}	
	 */
	 
	getLunbo:'api/getlunbo',		//轮播
	getgoodsList:'api/getgoodslist', //导航栏
	getguessList:'api/getguesslist', //猜你喜欢 
	getcate:'api/getcate',//一级分类
	getcateList:'api/getcatelist',//三级分类
	//getcates:'api/getcates',//二级分类
	getlist:'api/getlist',//获取分类商品
	//由于箭头函数不绑定this， 它会捕获其所在（即定义的位置）上下文的this值， 作为自己的this值，
	getforum:'api/getforum',//获取论坛信息
 	async noSignGet(endpoint)  {
		/* uni.showLoading({
			title:	'请稍后',
		});
		 */
		let fullurl = this.NOSIGNGETURL + endpoint;
		console.log(fullurl);
		let [error,res] = await uni.request({
			url:fullurl,
			header: {
			'Accept': 'application/json',
			'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息
			},
			method:'GET'
			
			/* success:(response) => {
				uni.hideLoading();
				 console.log('success'+response.data); 
				data = response.data;
				
			},
			
			fail:(error) => {
				uni.hideLoading();
				if (error && error.response) {
					conslole.log('fail');
					showError(error.response);
				}
			}, */
			
			/* complete:()=>{
				setTimeout(function() {
					uni.hideLoading();
				}, 250);
			} */
			
		
	});
	return res.data;
	
},
	async paramaGet(endpoint,data){
		let fullurl = this.NOSIGNGETURL + endpoint;
		let [error,res] = await uni.request({
				url:fullurl,
				data:data,
				header: {
				/* 'Accept': 'application/json', */
				'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息
				},
				method:'GET'
		
		});
		console.log(data);
		return res.data.data;	
	}

}



